ABC131 D - Megalomania
https://atcoder.jp/contests/abc131/tasks/abc131_d
提出
code: python
n = int(input())
ab =
list(map(int, input().split())) for _ in range(n)
time = 0
ab.sort(key=lambda x:x
1
)
for i in ab:
time += i
0
if (time > i
1
):
print("No")
exit()
print("Yes")